\(\int \cos ^7(a+b x) \sin ^5(a+b x) \, dx\) [98]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 46 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {\cos ^8(a+b x)}{8 b}+\frac {\cos ^{10}(a+b x)}{5 b}-\frac {\cos ^{12}(a+b x)}{12 b} \]

[Out]

-1/8*cos(b*x+a)^8/b+1/5*cos(b*x+a)^10/b-1/12*cos(b*x+a)^12/b

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2645, 272, 45} \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {\cos ^{12}(a+b x)}{12 b}+\frac {\cos ^{10}(a+b x)}{5 b}-\frac {\cos ^8(a+b x)}{8 b} \]

[In]

Int[Cos[a + b*x]^7*Sin[a + b*x]^5,x]

[Out]

-1/8*Cos[a + b*x]^8/b + Cos[a + b*x]^10/(5*b) - Cos[a + b*x]^12/(12*b)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int x^7 \left (1-x^2\right )^2 \, dx,x,\cos (a+b x)\right )}{b} \\ & = -\frac {\text {Subst}\left (\int (1-x)^2 x^3 \, dx,x,\cos ^2(a+b x)\right )}{2 b} \\ & = -\frac {\text {Subst}\left (\int \left (x^3-2 x^4+x^5\right ) \, dx,x,\cos ^2(a+b x)\right )}{2 b} \\ & = -\frac {\cos ^8(a+b x)}{8 b}+\frac {\cos ^{10}(a+b x)}{5 b}-\frac {\cos ^{12}(a+b x)}{12 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.48 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {600 \cos (2 (a+b x))+75 \cos (4 (a+b x))-100 \cos (6 (a+b x))-30 \cos (8 (a+b x))+12 \cos (10 (a+b x))+5 \cos (12 (a+b x))}{122880 b} \]

[In]

Integrate[Cos[a + b*x]^7*Sin[a + b*x]^5,x]

[Out]

-1/122880*(600*Cos[2*(a + b*x)] + 75*Cos[4*(a + b*x)] - 100*Cos[6*(a + b*x)] - 30*Cos[8*(a + b*x)] + 12*Cos[10
*(a + b*x)] + 5*Cos[12*(a + b*x)])/b

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.02

method result size
derivativedivides \(-\frac {\frac {\left (\sin ^{12}\left (b x +a \right )\right )}{12}-\frac {3 \left (\sin ^{10}\left (b x +a \right )\right )}{10}+\frac {3 \left (\sin ^{8}\left (b x +a \right )\right )}{8}-\frac {\left (\sin ^{6}\left (b x +a \right )\right )}{6}}{b}\) \(47\)
default \(-\frac {\frac {\left (\sin ^{12}\left (b x +a \right )\right )}{12}-\frac {3 \left (\sin ^{10}\left (b x +a \right )\right )}{10}+\frac {3 \left (\sin ^{8}\left (b x +a \right )\right )}{8}-\frac {\left (\sin ^{6}\left (b x +a \right )\right )}{6}}{b}\) \(47\)
parallelrisch \(\frac {30 \cos \left (8 b x +8 a \right )+100 \cos \left (6 b x +6 a \right )-600 \cos \left (2 b x +2 a \right )-75 \cos \left (4 b x +4 a \right )-5 \cos \left (12 b x +12 a \right )-12 \cos \left (10 b x +10 a \right )+562}{122880 b}\) \(74\)
risch \(-\frac {\cos \left (12 b x +12 a \right )}{24576 b}-\frac {\cos \left (10 b x +10 a \right )}{10240 b}+\frac {\cos \left (8 b x +8 a \right )}{4096 b}+\frac {5 \cos \left (6 b x +6 a \right )}{6144 b}-\frac {5 \cos \left (4 b x +4 a \right )}{8192 b}-\frac {5 \cos \left (2 b x +2 a \right )}{1024 b}\) \(86\)

[In]

int(cos(b*x+a)^7*sin(b*x+a)^5,x,method=_RETURNVERBOSE)

[Out]

-1/b*(1/12*sin(b*x+a)^12-3/10*sin(b*x+a)^10+3/8*sin(b*x+a)^8-1/6*sin(b*x+a)^6)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.78 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {10 \, \cos \left (b x + a\right )^{12} - 24 \, \cos \left (b x + a\right )^{10} + 15 \, \cos \left (b x + a\right )^{8}}{120 \, b} \]

[In]

integrate(cos(b*x+a)^7*sin(b*x+a)^5,x, algorithm="fricas")

[Out]

-1/120*(10*cos(b*x + a)^12 - 24*cos(b*x + a)^10 + 15*cos(b*x + a)^8)/b

Sympy [A] (verification not implemented)

Time = 2.63 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.41 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=\begin {cases} - \frac {\sin ^{4}{\left (a + b x \right )} \cos ^{8}{\left (a + b x \right )}}{8 b} - \frac {\sin ^{2}{\left (a + b x \right )} \cos ^{10}{\left (a + b x \right )}}{20 b} - \frac {\cos ^{12}{\left (a + b x \right )}}{120 b} & \text {for}\: b \neq 0 \\x \sin ^{5}{\left (a \right )} \cos ^{7}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(b*x+a)**7*sin(b*x+a)**5,x)

[Out]

Piecewise((-sin(a + b*x)**4*cos(a + b*x)**8/(8*b) - sin(a + b*x)**2*cos(a + b*x)**10/(20*b) - cos(a + b*x)**12
/(120*b), Ne(b, 0)), (x*sin(a)**5*cos(a)**7, True))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {10 \, \sin \left (b x + a\right )^{12} - 36 \, \sin \left (b x + a\right )^{10} + 45 \, \sin \left (b x + a\right )^{8} - 20 \, \sin \left (b x + a\right )^{6}}{120 \, b} \]

[In]

integrate(cos(b*x+a)^7*sin(b*x+a)^5,x, algorithm="maxima")

[Out]

-1/120*(10*sin(b*x + a)^12 - 36*sin(b*x + a)^10 + 45*sin(b*x + a)^8 - 20*sin(b*x + a)^6)/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (40) = 80\).

Time = 0.34 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.85 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {\cos \left (12 \, b x + 12 \, a\right )}{24576 \, b} - \frac {\cos \left (10 \, b x + 10 \, a\right )}{10240 \, b} + \frac {\cos \left (8 \, b x + 8 \, a\right )}{4096 \, b} + \frac {5 \, \cos \left (6 \, b x + 6 \, a\right )}{6144 \, b} - \frac {5 \, \cos \left (4 \, b x + 4 \, a\right )}{8192 \, b} - \frac {5 \, \cos \left (2 \, b x + 2 \, a\right )}{1024 \, b} \]

[In]

integrate(cos(b*x+a)^7*sin(b*x+a)^5,x, algorithm="giac")

[Out]

-1/24576*cos(12*b*x + 12*a)/b - 1/10240*cos(10*b*x + 10*a)/b + 1/4096*cos(8*b*x + 8*a)/b + 5/6144*cos(6*b*x +
6*a)/b - 5/8192*cos(4*b*x + 4*a)/b - 5/1024*cos(2*b*x + 2*a)/b

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.76 \[ \int \cos ^7(a+b x) \sin ^5(a+b x) \, dx=-\frac {{\cos \left (a+b\,x\right )}^8\,\left (10\,{\cos \left (a+b\,x\right )}^4-24\,{\cos \left (a+b\,x\right )}^2+15\right )}{120\,b} \]

[In]

int(cos(a + b*x)^7*sin(a + b*x)^5,x)

[Out]

-(cos(a + b*x)^8*(10*cos(a + b*x)^4 - 24*cos(a + b*x)^2 + 15))/(120*b)